#define   _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
void Reverse(char* left, char* right)
{
	while (left < right)
	{
		char tmp = *left;
		*left = *right;
		*right = tmp;
		left++;
		right--;
	}
}
void Left_Move(char arr[], int n)
{
	int len = strlen(arr);
	Reverse(&arr[0], &arr[0] + n - 1);
	Reverse(&arr[n], &arr[len - 1]);
	Reverse(&arr[0], &arr[len - 1]);
}
int main()
{
	int n = 0;
	scanf("%d", &n);
	char arr[] = "abcdef";
	printf("%s\n", arr);
	Left_Move(arr, n);
	printf("%s", arr);

	return 0;
}